﻿@model NC.ViewModels.CreatePost
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "Create Post";
}
<script src="@Url.Content("~/Scripts/js/CreatePost.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/js/Address.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/bootbox.min.js")" type="text/javascript"></script><script>
    $( document ).ready(function() {
        console.log( "document loaded" );
        bootbox.alert("Hello world!", function () {
            console.log("Alert Callback");
        });
    });
</script>



<div class="form-horizontal">
    @Html.ValidationSummary(true)
    <legend class="NcTitleBar">CREATE YOUR POST</legend>
    <div>
        <div class="form-group">
            <label class="col-sm-2 control-label"></label>
            <div class="col-sm-4">
                [ Please fill in the following form.] <br/>
                [ Fields with * are required.]
            </div>
        </div>
        <div id="addpostSectionBasic">
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-4">
                    @Html.RadioButtonFor(m => m.Needed, "1", new {@checked = "checked"}) I am looking for one <br/>
                    @Html.RadioButtonFor(m => m.Needed, "2") I have one available
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">Category *</label>
                <div class="col-sm-4">
                    @Html.DropDownListFor(model => model.CategoryID, new SelectList(Enumerable.Empty<SelectListItem>(), "catId", "catText"),
                        "Select", new {id = "ddlCategory", @class = "form-control"})
                </div>
            </div>
        </div>

        <div id="addpostSectionTitle">
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">Title *</label>
                <div class="col-sm-8">
                    @Html.TextBoxFor(model => model.Title, new {@class = "form-control", @placeholder = "Title", @required = "required"})
                    <span class="help-block">@Html.ValidationMessageFor(model => model.Title)</span>
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">Description *</label>
                <div class="col-sm-8">
                    @Html.TextAreaFor(model => model.Description, new {@class = "form-control", @placeholder = "Description", @rows = "8", @required = "required"})
                    <span class="help-block">@Html.ValidationMessageFor(model => model.Description)</span>
                </div>
            </div>
        </div>

        <div id="addpostSectionAddress">
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">Country *</label>
                <div class="col-sm-4">
                    @Html.DropDownListFor(model => model.Country, new SelectList(Enumerable.Empty<SelectListItem>(), "CountryId", "CountryText"),
                        "Select", new {id = "ddlCountry", @class = "form-control"})
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">State *</label>
                <div class="col-sm-4">
                    @Html.DropDownListFor(model => model.State, new SelectList(Enumerable.Empty<SelectListItem>(), "StateId", "StateText"),
                        "Select", new {id = "ddlState", @class = "form-control"})
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">City *</label>
                <div class="col-sm-4">
                    @Html.DropDownListFor(model => model.City, new SelectList(Enumerable.Empty<SelectListItem>(), "CityId", "CityText"),
                        "Select", new {id = "ddlCity", @class = "form-control"})
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">Zip Code</label>
                <div class="col-sm-3">
                    @Html.TextBoxFor(model => model.ZipCode, new {@class = "form-control", @placeholder = "Zip Code"})
                    <span class="help-block">@Html.ValidationMessageFor(model => model.ZipCode)</span>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">Email *</label>
                <div class="col-sm-3">
                    @Html.TextBoxFor(model => model.PostCreatorEmail, new {@class = "form-control", @placeholder = "Email"})
                    <span class="help-block">@Html.ValidationMessageFor(model => model.PostCreatorEmail)</span>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">Name *</label>
                <div class="col-sm-3">
                    @Html.TextBoxFor(model => model.PostCreatorName, new {@class = "form-control", @placeholder = "Your Name"})
                    <span class="help-block">@Html.ValidationMessageFor(model => model.PostCreatorName)</span>
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 ">Contact Phone</label>
                <div class="col-sm-4">
                    @Html.TextBoxFor(model => model.ContactPhone, new {@class = "form-control", @placeholder = "Contact Phone"})
                    <span class="help-block">@Html.ValidationMessageFor(model => model.ContactPhone)</span>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 "> </label>
                <div class="col-sm-8">
                    <div class="checkbox">
                        <label>
                            @Html.CheckBoxFor(model => model.ShowEmailInPost, new {@checked = "checked"}) @NC.NcMessage.DisplayEmailInPost
                        </label>
                        <span class="help-block">@Html.ValidationMessageFor(model => model.ShowEmailInPost)</span>
                    </div>
                </div>
            </div>
            <p>
                <input class="btn btn-primary" type="submit" id="btncreatepost" value="Create"/>
            </p>
        </div>
        @*}*@
    </div>
</div>
<script type="text/javascript">
           bootbox.alert("Hello world!", function() {
               alert("1");
           });</script>
